package Core_no_tiles.playerTest;

import java.awt.Graphics;
import java.awt.image.BufferedImage;

import Core.Core;
import Engine.Drawable;
import Engine.Updateable;
import Engine.Utils.Vector2f;

/**
 * A simple entity, which provides some variables which an object has.
 * @author Lueko
 *
 */
public class Entity implements Drawable, Updateable {

    protected boolean removed = false;
    protected Vector2f pos;
    protected int width, height;
    protected BufferedImage image;
    protected boolean solid;
    
    /**
     * @param pos Position of the entity.
     * @param solid Defines whether an entity can collide.
     */
    public Entity(Vector2f pos, boolean solid) {
        this.pos = pos;
        this.solid = solid;
    }

    @Override
    public void tick() {
    }

    @Override
    public void render(Graphics g) {
    }
    
    public void add() {
        Core.getDrawables().add(this);
        Core.getUpdateables().add(this);
    }

    @Override
    public boolean removed() {
        return removed;
    }

    public Vector2f getPos() {
        return pos;
    }
    
    public void setPos(Vector2f pos) {
        this.pos = pos;
    }
    
    public void remove() {
        removed = true;
    }

}
